package com.mes.schedule.domain;

import java.io.Serializable;

/**
 * 时段
 * date: Jun 22, 2015 5:04:18 PM <br/>  
 * @author Administrator  
 * @version   
 * @since JDK 1.6
 */
public class TimeSection implements Comparable<TimeSection> ,Serializable{
	
	protected long start;
	protected long end;
	
	
	public TimeSection() {
		super();
	}
	public TimeSection(long start, long end) {
		super();
		this.start = start;
		this.end = end;
	}
	/**
	 * @return the start
	 */
	public long getStart() {
		return start;
	}
	/**
	 * @param start the start to set
	 */
	public void setStart(long start) {
		this.start = start;
	}
	/**
	 * @return the end
	 */
	public long getEnd() {
		return end;
	}
	/**
	 * @param end the end to set
	 */
	public void setEnd(long end) {
		this.end = end;
	}	
	public int compareTo(TimeSection o) {
		int i=0;
		if (this.start<o.start) {
			i=-1;
		}else {
			if (this.start==o.start) {
				i=0;
			}else {
				i=1;
			}
		}		
		return i;		
	}
}
